home *** CD-ROM | disk | FTP | other *** search
-
- toolbox/src/exampleCode/opengl/2Dwrap README
-
-
- 2Dwrap is a layer which will enable you to port 2d primitive
- calls (arc,circle,rectangle,sbox) from IrisGL to OpenGL.
-
- Why do you need 2DWRAP?
- -----------------------
-
- For porting rectangles, you may try to use the openGL call
- glRect(), but you have to keep track of the current polygon
- mode. glRect() will draw filled or plain rectangles depending
- upon the polygon mode. Querying and setting polygon modes
- could be expensive. OpenGL does not provide separate calls
- for filled and unfilled rectangles (like rect and rectf in
- IrisGL).
-
- There's no sbox() equivalent in openGL and using glRect()
- will have similar performance issues (see reason above).
-
- For arcs, you may use gluPartialDisk(). But it draws 2 radial
- lines (like pacman) at the end of arcs. Also it does some
- checking for different state variables. The routine in the
- wrapper layer could be tuned to the application needs.
-
- The 2 directories igl and ogl are IrisGL and openGL
- equivalents of the same program.
-
-
- --
-
- Yusuf Attarwala
- yusuf@engr.sgi.com
-
-